﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quartz;
using Quartz.Impl;
using Quartz.Job;

namespace Cherry.Agile.Scheduler.Test
{
    public class TestJobBuilder : Cherry.Agile.Scheduler.BasicTaskBuilder<TestJob>
    {
        protected override Quartz.ITrigger CreateTrigger()
        {
            ITrigger trigger = TriggerBuilder.Create().WithIdentity("testTrigger", "TestJob").StartNow().WithDailyTimeIntervalSchedule(x => 
              x.WithIntervalInSeconds(1).WithRepeatCount(0)
            ).Build();
            //ITrigger trigger = TriggerUtils.MakeDailyTrigger(0, 0); //10 second
            //trigger.StartTimeUtc = DateTime.UtcNow;
            //trigger.Name = "Test";
            return trigger;
        }
    }
}
